<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<link href="__STATIC__/css/admin/style.css" rel="stylesheet"/>
	<title><?php echo L('website_manage');?></title>
	<script>
	var URL = '__URL__';
	var SELF = '__SELF__';
	var ROOT_PATH = '__ROOT__';
	var APP	 =	 '__APP__';
	//语言项目
	var lang = new Object();
	<?php $_result=L('js_lang');if(is_array($_result)): $i = 0; $__LIST__ = $_result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?>lang.<?php echo ($key); ?> = "<?php echo ($val); ?>";<?php endforeach; endif; else: echo "" ;endif; ?>
	</script>
</head>

<body>
<div id="J_ajax_loading" class="ajax_loading"><?php echo L('ajax_loading');?></div>
<?php if(($sub_menu != '') OR ($big_menu != '') OR ($ajaxMenuList != '')): ?><div class="subnav">
    <div class="content_menu ib_a blue line_x">
    	<?php if(!empty($big_menu)): ?><a class="add fb J_showdialog" href="javascript:void(0);" data-uri="<?php echo ($big_menu["iframe"]); ?>" data-title="<?php echo ($big_menu["title"]); ?>" data-id="<?php echo ($big_menu["id"]); ?>" data-width="<?php echo ($big_menu["width"]); ?>" data-height="<?php echo ($big_menu["height"]); ?>"><em><?php echo ($big_menu["title"]); ?></em></a>　<?php endif; ?>

        <?php if(!empty($ajaxMenuList)): if(is_array($ajaxMenuList)): foreach($ajaxMenuList as $key=>$big_menu): ?><a class="add fb J_showdialog" href="javascript:void(0);" data-uri="<?php echo ($big_menu["iframe"]); ?>" data-title="<?php echo ($big_menu["title"]); ?>" data-id="<?php echo ($big_menu["id"]); ?>" data-width="<?php echo ($big_menu["width"]); ?>" data-height="<?php echo ($big_menu["height"]); ?>"><em><?php echo ($big_menu["title"]); ?></em></a>　<?php endforeach; endif; endif; ?>      
        <?php if(!empty($sub_menu)): if(is_array($sub_menu)): $key = 0; $__LIST__ = $sub_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($key % 2 );++$key; if($key != 1): ?><span>|</span><?php endif; ?>
        <a href="<?php echo U($val['moduleName'].'/'.$val['actionName'],array('menuid'=>$menuid)); echo ($val["data"]); ?>" class="<?php echo ($val["class"]); ?>"><em><?php echo L($val['name']);?></em></a><?php endforeach; endif; else: echo "" ;endif; endif; ?>
    </div>
</div><?php endif; ?>
<!--导入信息-->
<div class="pad_lr_10">
<div class="explain_col pad_10">
    <b>说明： </b>
</div>
<table width="100%" cellspacing="0" class="search_form">
    <tbody>
        <tr>
            <td>
                <div class="explain_col">                                    
                    <div id="J_upload_excel" class="btn" style="clear: both;"><span><?php echo L('upload_excel');?></span></div> 
                    <div class="btn" style=" float:right;"><span><a href="__TARGET_EXCEL_TEMP__">下载模板</a></span></div>   
                </div>
            </td>
        </tr>
    </tbody>
</table>

                    
    <form name="searchform" method="get" >
    <table width="100%" cellspacing="0" class="search_form">
        <tbody>
        <tr>
            <td>
            <div class="explain_col">
                <input type="hidden" name="g" value="admin" />
                <input type="hidden" name="m" value="target" />
                <input type="hidden" name="a" value="index" />
                <input type="hidden" name="menuid" value="<?php echo ($menuid); ?>" />
                时间范围：
                <input type="text" name="time_start" id="time_start" class="date" size="12" value="<?php echo ($search["time_start"]); ?>">
                -
                <input type="text" name="time_end" id="time_end" class="date" size="12" value="<?php echo ($search["time_end"]); ?>">
                          
                <label><input type="radio" name="type" value="1" />查地市</label>    
                <label><input type="radio" name="type" value="1" />查县区</label>     
                <label><input type="radio" name="type" value="1" />查人员</label>          
                          
                <input type="submit" name="search" class="btn" value="<?php echo L('search');?>" />
            </div>
            </td>
        </tr>
        </tbody>
    </table>
    </form>

    <div class="J_tablelist table_list" data-acturi="<?php echo U('target/ajax_edit');?>">
    <table width="100%" cellspacing="0">
        <thead>
            <tr>
                <th width=25><input type="checkbox" id="checkall_t" class="J_checkall"></th>
                <th width="30" > <span data-tdtype="date" data-field="title">日期</span></th>       
                       
                <th width="100" > <span data-tdtype="date" data-field="to"><?php echo ($typeList[$type]['name']); ?></span></th> 
                <th width="100" > <span data-tdtype="date" data-field="userId">人员姓名</span></th> 

                <th width=80><span data-tdtype="order_by" data-field="allModel">总任务量</span></th>
                <th width=80><span data-tdtype="order_by" data-field="importModel">重点机型务量</span></th>               
				<th width=150><span data-tdtype="order_by" data-field="addTime">下达指标时间</span></th>
                <!--th width="80"><?php echo L('operations_manage');?></th-->
            </tr>
        </thead>
        <tbody>
            <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><tr>
                <td align="center"><input type="checkbox" class="J_checkitem" value="<?php echo ($val["id"]); ?>"></td>
                <td align="center"><?php echo (date('Y-m-d',$val["addTime"])); ?></td>
                <td align="center"><?php echo ($val[$typeList[$type]['file']]['name']); ?></td>
                <td align="center"><?php echo ($val['realName']); ?></td>
                <td align="center"><b><?php echo ($val["allModel"]); ?></b></td>
                <td align="center"><b><?php echo ($val["importModel"]); ?></b></td>
                <td align="center"><?php echo (date('Y-m-d H:i:s',$val["addTime"])); ?></td>
                
                    
                    
                <!--td align="center">
                    <a href="javascript:;" class="J_showdialog" data-uri="<?php echo U('target/show', array('userId'=>$val['userId']));?>" data-title="<?php echo ($val['realName']); ?> 的指标详情"  data-id="edit" data-width="450" data-height="450">查看详情</a>
                </td-->
            </tr><?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
    </table>

    <div class="btn_wrap_fixed">
        <label class="select_all"><input type="checkbox" name="checkall" class="J_checkall"><?php echo L('select_all');?>/<?php echo L('cancel');?></label>
        <input type="button" class="btn" data-tdtype="batch_action" data-acttype="ajax" data-uri="<?php echo U('target/delete');?>" data-name="id" data-msg="<?php echo L('confirm_delete');?>" value="<?php echo L('delete');?>" />
        <div id="pages"><?php echo ($page); ?></div>
    </div>

    </div>


       
</div>

<script src="__STATIC__/js/jquery/jquery.js"></script>
<script src="__STATIC__/js/jquery/plugins/jquery.tools.min.js"></script>
<script src="__STATIC__/js/jquery/plugins/formvalidator.js"></script>
<script src="__STATIC__/js/pinphp.js"></script>
<script src="__STATIC__/js/admin.js"></script>
<script>
//初始化弹窗
(function (d) {
    d['okValue'] = lang.dialog_ok;
    d['cancelValue'] = lang.dialog_cancel;
    d['title'] = lang.dialog_title;
})($.dialog.defaults);
</script>

<?php if(isset($list_table)): ?><script src="__STATIC__/js/jquery/plugins/listTable.js"></script>
<script>
$(function(){
	$('.J_tablelist').listTable();
});
</script><?php endif; ?>
<link rel="stylesheet" type="text/css" href="__STATIC__/js/calendar/calendar-blue.css"/>
<script src="__STATIC__/js/calendar/calendar.js"></script>
<script src="__STATIC__/js/fileuploader.js"></script>
<script>

	//上传excel
    var uploader = new qq.FileUploaderBasic({
    	allowedExtensions: ['xls'],
        button: document.getElementById('J_upload_excel'),
        multiple: false,
        action: "<?php echo U('import/importTarget');?>",
        inputName: 'excel',
        forceMultipart: true, //用$_FILES
        messages: {
        	typeError: lang.upload_type_error,        	
        	minSizeError: lang.upload_minsize_error,
        	emptyError: lang.upload_empty_error,
        	noFilesError: lang.upload_nofile_error,
        	onLeave: lang.upload_onLeave
        },
        showMessage: function(message){
        	$.pinphp.tip({content:message, icon:'error'});
        },
        onSubmit: function(id, fileName){
        	$('#J_upload_excel').addClass('btn_disabled').find('span').text(lang.uploading);
        },
        onComplete: function(id, fileName, result){
            
        	$('#J_upload_excel').removeClass('btn_disabled').find('span').text(lang.upload_excel);
            if(result.status == '1'){
        		//$('#J_img').val(result.data);
                $.pinphp.tip({content:result.msg, icon:'success'});
        	} else {
        		$.pinphp.tip({content:result.msg, icon:'error'});
        	}
        }
    });


$('.J_cate_select').cate_select({top_option:lang.all});
Calendar.setup({
    inputField : "time_start",
    ifFormat   : "%Y-%m-%d",
    showsTime  : false,
    timeFormat : "24"
});
Calendar.setup({
    inputField : "time_end",
    ifFormat   : "%Y-%m-%d",
    showsTime  : false,
    timeFormat : "24"
});

    
</script>
</body>
</html>